package org.quickstart.guice;

import com.google.inject.Singleton;
import net.customware.gwt.dispatch.server.guice.ActionHandlerModule;
import org.quickstart.api.service.ContactsService;
import org.quickstart.dispatch.handlers.GetContactsHandler;
import org.quickstart.dispatch.handlers.UpdateContactsHandler;
import org.quickstart.services.ContactsServiceImpl;

/**
 * @author Yoav Aharoni
 */
public class QuickStartServicesModule extends ActionHandlerModule {
	@Override
	protected void configureHandlers() {
		// QuickStart example dispatcher handlers
		bindHandler(GetContactsHandler.class);
		bindHandler(UpdateContactsHandler.class);

		bind(ContactsService.class).to(ContactsServiceImpl.class).in(Singleton.class);
	}
}
